package com.ruoyi.web.controller.mall.mallInvoiceShop.service.impl;

import com.ruoyi.web.controller.mall.mallInvoiceShop.domain.MallInvoiceShop;
import com.ruoyi.web.controller.mall.mallInvoiceShop.mapper.MallInvoiceShopMapper;
import com.ruoyi.web.controller.mall.mallInvoiceShop.service.IMallInvoiceShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 商家开票规则Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-01-18
 */
@Service
public class MallInvoiceShopServiceImpl implements IMallInvoiceShopService 
{
    @Autowired
    private MallInvoiceShopMapper mallInvoiceShopMapper;

    /**
     * 查询商家开票规则
     * 
     * @param id 商家开票规则ID
     * @return 商家开票规则
     */
    @Override
    public MallInvoiceShop selectMallInvoiceShopById(String id)
    {
        return mallInvoiceShopMapper.selectMallInvoiceShopById(id);
    }

    /**
     * 查询商家开票规则列表
     * 
     * @param mallInvoiceShop 商家开票规则
     * @return 商家开票规则
     */
    @Override
    public List<MallInvoiceShop> selectMallInvoiceShopList(MallInvoiceShop mallInvoiceShop)
    {
        return mallInvoiceShopMapper.selectMallInvoiceShopList(mallInvoiceShop);
    }

    /**
     * 新增商家开票规则
     * 
     * @param mallInvoiceShop 商家开票规则
     * @return 结果
     */
    @Override
    public int insertMallInvoiceShop(MallInvoiceShop mallInvoiceShop)
    {
        return mallInvoiceShopMapper.insertMallInvoiceShop(mallInvoiceShop);
    }

    /**
     * 修改商家开票规则
     * 
     * @param mallInvoiceShop 商家开票规则
     * @return 结果
     */
    @Override
    public int updateMallInvoiceShop(MallInvoiceShop mallInvoiceShop)
    {
        return mallInvoiceShopMapper.updateMallInvoiceShop(mallInvoiceShop);
    }

    /**
     * 删除商家开票规则对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteMallInvoiceShopByIds(String[] ids)
    {
        return mallInvoiceShopMapper.deleteMallInvoiceShopByIds(ids);
    }

    /**
     * 删除商家开票规则信息
     * 
     * @param id 商家开票规则ID
     * @return 结果
     */
    @Override
    public int deleteMallInvoiceShopById(String id)
    {
        return mallInvoiceShopMapper.deleteMallInvoiceShopById(id);
    }
}
